import axios from 'axios'
import {Indicator} from 'mint-ui'

const $http = axios.create({
  baseURL: 'https://api.1zhiyin.com/'
})

$http.interceptors.request.use(config => {
  Indicator.open('加载中...')
  return config
})

$http.interceptors.response.use(resp => {
  Indicator.close()
  return resp
})

export default $http
